package chai.ningning.status;

import java.io.IOException;
import java.io.InputStream;
import java.util.concurrent.TimeUnit;

public class ThreadStatusTest1 {

    public static void main(String[] args) throws InterruptedException, IOException {
        Thread current = Thread.currentThread();
        System.out.println("before sleep :"+current.getState());

        TimeUnit.SECONDS.sleep(30);

        System.out.println("before sleep :"+current.getState());

        InputStream inputStream = System.in;
        System.out.println( "你可以在键盘上输入数据，但我只读取一个字节" );
        int b = inputStream.read();
        System.out.println((char)b);
    }
}
